package com.rpframework.module.common.springmvc.form;

import org.springframework.web.bind.annotation.InitBinder;

public class WebDataBinder extends org.springframework.web.bind.WebDataBinder {

	public WebDataBinder(Object target) {
		super(target);
	}

	/**
	 * 由于Spring在接受前台传入的List时，<br>
	 * 就会出现256的IndexOutOfBoundsException异常 <br>
	 * 设置setAutoGrowCollectionLimit为1024
	 * 
	 * @param binder
	 *            目标
	 * @see [类、类#方法、类#成员]
	 */
	@InitBinder
	public void initListBinder(WebDataBinder binder) {
		// 设置需要包裹的元素个数，默认为256
		binder.setAutoGrowCollectionLimit(2048);
	}
}
